<script src="<?php echo URL::base(true)?>media/js/jquery-1.10.1.min.js"></script>
<link rel="stylesheet" href="<?php echo URL::base(true)?>media/js/jquery-ui.css">
<script src="<?php echo URL::base(true)?>media/js/jquery-ui.js"></script>
<link rel="stylesheet" href="<?php echo URL::base() ?>media/vendor/artdialog/skins/default.css" type="text/css" media="all" />
<script src="<?php echo URL::base() ?>media/vendor/artdialog/jquery.artDialog.js"></script>	 
<script type="text/javascript"><!--
$(document).ready(function(){

	$(".resetwarning").click(function(){
		var sku = this.id;
		var details = {'sku':sku};
		var data = new Array();
		data.push(details);

	    $.ajax({		
			type:'post',
			url:'<?php echo url::base(true)?>warning/nowarning_one',
			dataType:'json',
			data:{"data":data,'status':0},
			async:false,
			success:function(data)
			{
				if(data)
				{
					flag = true;
				}
			},
			error:function()
			{
				
			}
			});
		if(flag)
		{
			alert(sku+' 重新预警成功');
			location.reload();
		}
		else{
			alert(sku+" 重新预警操作失败");
		}
		
		});
	
});
--></script>
<form action="" method="get">
SKU:<input type="text" name="sku">
<input type="submit" value="查询" class="btn btn-info">
</form>
<?php if($skus){
	?>
	<div id="divremark">总共有<?php echo $sum;?>条记录</div>
<table class="table table-bordered">
	<tr>
		<th>SKU</th>
		<th>操作</th>
		
	</tr>
	<?php foreach ($skus as $sku){?>
	<tr>
	<td>
	<?php echo $sku['sku']?>
	</td>
	<td>
	<button id="<?php echo $sku['sku'] ;?>" class="btn btn-info resetwarning"
	type="button" value="重新下单">重新下单</button>
	</td>
	</tr>
	<?php }?>
	</table>
	<?php if(isset($pagination))echo $pagination;?>
	<?php }?>